﻿using System.Text;
using AccelerateSensor.SocketServer.Server;
using SuperSocket.SocketBase.Command;

namespace AccelerateSensor.SocketServer.Command
{
    public class SensorCmd : CommandBase<MySession, MyRequestInfo>
    {
        public override string Name => string.Empty;

        public override void ExecuteCommand(MySession session, MyRequestInfo requestInfo)
        {
            var data = Encoding.UTF8.GetString(requestInfo.Body);
            session.ReceiveSensorData(data);
        }
    }
}
